package com.yidu.BusinessManagement.controller;

import com.yidu.BusinessManagement.entity.DealData;
import com.yidu.BusinessManagement.service.DealDataService;
import com.yidu.BusinessParament.entity.Bond;
import com.yidu.BusinessParament.entity.ExchangeRate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author 苏彬
 * @date 2022/12/9 14:06
 **/
@RestController
public class DealDataController {
    @Autowired
    private DealDataService service;

    @RequestMapping("/selectDealDate")
    public Map selectDealDate(int page, int row, String dealTime, String securityName) {
        return service.selectDealDate(page, row, dealTime, securityName);
    }

    @RequestMapping("/deleteDealDate")
    public void deleteDealDate(String myArr) {
        service.deleteDealDate(myArr);
    }

    @RequestMapping("/TestSelectSecurity")
    public Map selectSecurity() {
        return service.selectSecurity();
    }

    @RequestMapping("/TestSelectBroker")
    public Map TestSelectBroker() {
        return service.selectBroker();
    }

    @RequestMapping("/TestSelectDealData")
    public Map TestSelectDealData() {
        return service.selectDealData();
    }

    @RequestMapping("/addDealDate")
    public int addDealDate(DealData data) {
        return service.addDealDate(data);
    }

    @RequestMapping("/updateDealDate")
    public void updateDealDate(DealData data) {
        service.updateDealDate(data);
    }

    @RequestMapping("/ExchangeRateMoney")
    public ExchangeRate ExchangeRateMoney(String securityId) {
        ExchangeRate exchangeRate = service.ExchangeRateMoney(securityId);
        return service.ExchangeRateMoney(securityId);
    }

    @RequestMapping("/selectBondd")
    public Bond selectBondd(String securityId) {
        return service.selectBondd(securityId);
    }
    @RequestMapping("/selectCommission")
    String selectCommission(String seatId){
        return service.selectCommission(seatId);
    }
}
